package com.ruoyi.web.controller.monitor;

import com.github.pagehelper.PageInfo;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.SysPythonEntity;
import com.ruoyi.system.domain.SysPythonEntityDTO;
import com.ruoyi.system.domain.vo.PageVo;
import com.ruoyi.system.service.IMpSysPythonAddressService;
import com.ruoyi.system.service.IMpSysPythonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  平台数据
 * </p>
 *
 * @author <a href="https://fengwenyi.com?fs=mpcg">Erwin Feng</a>
 * @since 2024-01-16
 */
@RestController
@RequestMapping("/monitor/python")
public class SysPythonController extends BaseController {
    @Autowired
    private IMpSysPythonService iMpSysPythonService;
    @Autowired
    private IMpSysPythonAddressService iMpSysPythonAddressService;

    @Anonymous
    @GetMapping("/pythonlist")
    public TableDataInfo pythonlist( SysPythonEntityDTO sysPythonEntityDTO , PageVo pageVo) {
        PageInfo<SysPythonEntity> sysPythonEntityList = iMpSysPythonService.sysPythonPage(sysPythonEntityDTO, pageVo);

            TableDataInfo tableDataInfo = getDataTable(sysPythonEntityList.getList());
            tableDataInfo.setTotal(sysPythonEntityList.getTotal());
            return tableDataInfo;

        }


}
